acup: src/main.c init.o keypress.o display.o msgcodes.o control.o xacontrol.o include/control.h
	gcc -g -Wall src/main.c init.o keypress.o display.o msgcodes.o control.o xacontrol.o lib/xaudio/libxaudio.a lib/lcd/liblcd.a -ldl -o acup

init.o: src/init.c include/init.h
	gcc -g -Wall -c src/init.c

keypress.o: src/keypress.c include/keypress.h
	gcc -g -Wall -c src/keypress.c

display.o: src/display.c include/display.h
	gcc -g -Wall -c src/display.c

msgcodes.o: src/msgcodes.c include/msgcodes.h
	gcc -g -Wall -c src/msgcodes.c

control.o: src/control.c include/control.h
	gcc -g -Wall -c src/control.c

xacontrol.o: src/xacontrol.c include/xacontrol.h
	gcc -g -Wall -c src/xacontrol.c

clean:
	@echo "Cleaning object files from directory structure..."
	rm -f *.o
	@echo "COMPLETE!"

destroy:
	@echo "Cleaning out object files and binary files..."
	rm -f *.o
	rm -f acup
	@echo "COMPLETE!"
